<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>2d缩放</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            background: red;
            transition: 2s;
            margin: 300px auto;
        }
        div:hover{
            /*负数：会变成倒放效果*/
            transform: scale(2);
            /*按照哪个点来放大缩小*/
            transform-origin: left top;
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>